vcTransportSolution
Transport solution is a single route from one transport node (vcTransportNode) to another transport node without any branches or loops. The transport solutions are enforced to be valid when they are created or modified. The solution consists of an ordered list of transport link references (vcTransportLink), starting from the Source node and ending to the Destination node. Note: A valid transport solution conforms to these rules: - Transport solution can be empty i.e. contain no links. Using empty solutions is not recommended. Set the vcProduct.TransportSolution to None instead. - Each transport link's Source node is the same as the previous link's Destination node (must form a continuous one-directional path) - No two links have the same Source node (cannot contain branches) - No two links have the same Destination node (cannot contain joins or loops) - The Source and Destination nodes of the whole solution cannot be the same (cannot be a loop).
See in: Overview
Module: vcProcessModel
Parent: vcObject
Children -
Referenced by: vcProduct.TransportSolution, vcTransportSystem.findSolution()
Properties
Learn how to use properties here. The properties are also inherited from the parent class.
| Name | Type | Access | Description |
| Destination | vcTransportNode | R | Gets the transport node this route ends in. Returns None if the solution is empty. |
| Links | vcList[vcTransportLink] | R | Gets the list of transport links that need to be travelled to get from the Source node to the Destination node, starting from Source. |
| Source | vcTransportNode | R | Gets the transport node this route starts from. Returns None if the solution is empty. |
Methods
Learn how to use methods here. The methods are also inherited from the parent class.
| Name | Return Type | Parameters | Description |
| getNextLink | vcTransportLink | vcTransportNode node | Returns the transport link that has the given transport node as its Source.See moreParameters: node (vcTransportNode): The source node to get the next link from. Returns: vcTransportLink: Found link orignating from the given node. None if no such link exists. |
| new | vcTransportSolution | List[vcTransportLink] links | Creates a new transport solution from a set of links that must conform to the rules of a valid solution.See moreParameters: links (List of vcTransportLink): The links, in order of traversal. Returns: vcTransportLink: The created transport solution. Exceptions: ValueError: If the created solution was invalid. Shows the index of the link that caused the solution to be invalid. |
| setOnSolutionInvalidated | None | Callable OR None function | Sets the callback function that is called when the transport solution is invalidated.See moreParameters: function (callable): The function to call when the event is triggered. |